#include "mystring.h"
#include <string.h>
#include <stdlib.h>

int stringTofloat(const char*str, uint8_t len, float *val)
{
	char* endstr;
	if (strlen(str) > len)
		return 1;
	*val = (float)strtod(str, &endstr);
	if (*endstr != NULL)
		return 2;
	return 0;
}

